<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAnswersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('answers', function (Blueprint $table) {
            $table->increments('id')         ->comment('唯一标识');
            $table->text('answer')           ->nullable()->comment('标题');
            $table->integer('is_right')      ->default(0)->comment('内容');
            $table->string('desc')           ->nullable()->comment('备注');
            $table->integer('qid')           ->default(0)->comment('问题id');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
